package meijuli.com.join51.business.setpaypwd;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;

import meijuli.com.join51.business.R;
import com.jhx.common.framework.QuickBaseActivity;

/**
 * 支付密码页面
 *
 * @author jack 2017-05-08 15:36
 */
public class PayPwdActivity extends QuickBaseActivity {
    public static final String KEY_TYPE = "type";
    public static final String KEY_CODE = "mCode";
    public static final String KEY_PHONE = "phone";
    public static final String mEventMessage = "PayPwdActivity";
    public static final int SET_PASSWORD = 1;
    public static final int UPDATE_PASSWORD = 2;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_container);
        if (getIntent().getIntExtra(KEY_TYPE, SET_PASSWORD) == SET_PASSWORD) {
            setTitle("设置交易密码");
        } else {
            setTitle("重置交易密码");
        }
        Bundle bundle = new Bundle();
        Intent intent = getIntent();
        bundle.putInt(KEY_TYPE, intent.getIntExtra(KEY_TYPE, 0));
        bundle.putString(KEY_CODE, intent.getStringExtra(KEY_CODE));
        bundle.putString(KEY_PHONE, intent.getStringExtra(KEY_PHONE));
        push(SetPayPwdFragment.class, bundle);
    }

    @Override
    public int containerId() {
        return R.id.container;
    }
}
